<%#
# To change this template, choose Tools | Templates
# and open the template in the editor.
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <title>网上商店</title>
    <%= stylesheet_link_tag "scaffold", "depot", "admin", :media => "all" %>
  </head>
  <body>
    <div id="banner">
       <img src="/productshop/images/logo.png"/>
      <%= @page_title || "网上商店管理界面" %>
    </div>
    <div id="columns">
     
        <div id="side">
           <% if session[:user_id] -%>
          <%= link_to("管理产品", :controller => 'products', :action => 'index') %><br />
          <%= link_to("处理订单", :controller => 'admin', :action => 'ship') %>
          <hr/>
          <%= link_to("添加用户", :controller => "login",
            :action => "add_user") %><br />
          <%= link_to("管理用户", :controller => "login",
            :action => "list_users") %><br />
          <hr/>
          <%= link_to("安全退出", :controller => "login",
            :action => "logout") %>
        <% end -%>
        
      </div>
      <div id="main">
        <% if flash[:notice] -%>
          <div id="notice"><%= flash[:notice] %></div>
        <% end -%>

        <%= yield :layout %>
      </div>
    </div>
  </body>
</html>

